package org.ljy.lotterysystem.service.enums;


//用户身份枚举

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.amqp.core.Message;

@Getter
@AllArgsConstructor
public enum UserIdentityEnum {

    ADMIN("管理员"),
    NORMAL("普通用户");

    private final String message;

    //用来判断是否存在身份
    public static UserIdentityEnum forName(String name) {
        for(UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()) {
            if(userIdentityEnum.name().equalsIgnoreCase(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }

}
